<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="vo.Customer" %>
<%@ page import="dao.CustomerDao" %>
<html>
  <body>
    <%
    request.setCharacterEncoding("utf-8");
    String account=request.getParameter("account");
    String password=request.getParameter("password");
    
    CustomerDao cdao=new CustomerDao();
    Customer customer=cdao.getCustomerByAccount(account);
    if(customer==null||!customer.getPassword().equals(password))
    {
     %>
     登录失败，<a href="loginForm.jsp">返回登录页面</a>
     <%
     }else{
     session.setAttribute("customer", customer);
     	response.sendRedirect("show.jsp");
     }
      %>
      
  </body>
</html>
